﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TowerDefense.Debuffs;
using TowerDefense.Units;

namespace TowerDefense.Towers
{
    public abstract class Munition : Entity
    {
        private List<Effect> _effects = new List<Effect>();

        public int Damage
        {
            get;
            set;
        }

        public List<Effect> Effects
        {
            get
            {
                return _effects;
            }
            set
            {
                _effects = value;
            }
        }

        public Creep Target
        {
            get;
            set;
        }
        public float Direction
        {
            get;
            set;
        }
        protected void Impact()
        {
            this.Target.Health -= Damage;
            this.Target.UnderEffects.AddRange(this.Effects);
        }
    }
}